Conventionally, there have been developed various apparatuses for converting a color of a displayed image into a color desired by a user, for example, as disclosed in Japanese Laid-Open Patent Publication No. 8-293995 (hereinafter, referred to as Patent Document 1). An image processing apparatus disclosed in the Patent Document 1 extracts hue, saturation, and brightness of a pixel corresponding to a position designated by the user, and determines maximum and minimum values of these components. Then, when the user designates a color which is desired to change to, the image processing apparatus converts colors of pixels in a previously determined range into the designated color.
However, by the user designating a plurality of positions with respect to a scanned still image, the image processing apparatus disclosed in the Patent Document 1 sets a minimum value to a maximum value of each of hue, saturation, and brightness of each of pixels corresponding to the plurality of positions as a range to be color-converted. Thus, the user needs to designate a plurality of positions with respect to an image in performing color conversion, and an operation becomes troublesome. If the user designates only a single position in performing color conversion, a range to be color-converted is a pinpoint, and it is considered that color conversion with respect to an image is hardly performed.
Therefore, certain example embodiments provide a color conversion apparatus, an imaging apparatus, a storage medium storing a color conversion program, and a storage medium storing an imaging program which are capable of performing color conversion desired by a user with respect to a displayed image in accordance with a simple operation.
Certain example embodiments have the following features. It is noted that reference characters, step numbers, and supplementary explanations in parentheses are merely provided to facilitate the understanding of certain example embodiments, rather than limiting the scope in any way.
A first aspect is a color conversion apparatus (1) for performing color conversion of an image displayed on a display device (12) in accordance with an output from a pointing device (13) for outputting an input position (TP). The color conversion apparatus comprises display image display control means (a CPU 31 executing a step 52, and hereinafter, only a step number is described), input position obtaining means (S54), hue obtaining means (S55, S56), conversion target range setting means (S56), and color conversion means (S57). The display image display control means is means for displaying a predetermined display image on the display device. The input position obtaining means is means for obtaining the input position from the pointing device (Da). The hue obtaining means is means for obtaining a hue of the display image corresponding to the input position obtained by the input position obtaining means. The conversion target range setting means is means for setting a predetermined hue range having the hue obtained by the hue obtaining means at a center thereof as a conversion target range (De). The color conversion means is means for changing at least one of saturation, brightness, and hue with respect to a pixel of the display image which has a hue within the conversion target range, and displaying a resultant image on the display device. It is noted that the pointing device is an input device for designating an input position or coordinates on a screen, and realized, for example, by a touch panel, a mouse, a trackpad, a trackball, a pen tablet, a joystick, a system for detecting a screen position at which a housing of a game controller is pointed, and the like.
In a second aspect based on the first aspect, the display image display control means may display on the display device the display image which is converted into an achromatic image by decreasing saturation of all pixels of a chromatic original image. In this case, the color conversion means returns saturation of a pixel of the display image which has a hue within the conversion target range to saturation in the original image, and displays a resultant image on the display device.
In a third aspect based on the second aspect, the color conversion means may change saturation of a pixel having a hue within the conversion target range which is away from a center of the conversion target range while gradually decreasing a rate of returning the saturation of the pixel to saturation in the original image as the hue is away from the center (FIG. 5).
In a fourth aspect based on the third aspect, the color conversion means may change saturation of a pixel having a hue within the conversion target range which is away from the center of the conversion target range while linearly decreasing a rate of returning the saturation of the pixel to saturation in the original image from 100% to 0% as the hue is away from the center (FIG. 5).
In a fifth aspect based on the first aspect, when the input position obtaining means obtains a plurality of input positions at different timings, the hue obtaining means may obtain a hue of the display image corresponding to each of the input positions. In this case, the conversion target range setting means sets predetermined hue ranges having the hues obtained by the hue obtaining means at centers thereof, respectively, as a first conversion target range and a second conversion target range. Then, the color conversion means changes at least one of saturation, brightness, and hue with respect to a pixel of the display image which has a hue within the first conversion target range and a pixel of the display image which has a hue within the second conversion target range, and displays a resultant image on the display device (FIG. 7).
In a sixth aspect based on the fifth aspect, the color conversion means may change at least one of saturation and brightness of a pixel having a hue within the first conversion target range which is away from the center of the first conversion target range while gradually decreasing a rate of changing at least one of the saturation and the brightness of the pixel as the hue is away from the center. The color conversion means may change at least one of saturation and brightness of a pixel having a hue within the second conversion target range which is away from the center of the second conversion target range while gradually decreasing a rate of changing at least one of the saturation and the brightness of the pixel as the hue is away from the center. When the first conversion target range and the second conversion target range partially overlap with each other, the color conversion means selects a higher rate among a rate of changing at least one of saturation and brightness for the first conversion target range and a rate of changing at least one of saturation and brightness for the second conversion target range, and changes at least one of saturation and brightness of a pixel having a hue within an overlapping range (FIG. 7).
In a seventh aspect based on the fifth aspect, the color conversion means may change at least one of saturation and brightness of a pixel having a hue within the first conversion target range which is away from the center of the first conversion target range while gradually decreasing a rate of changing at least one of the saturation and the brightness of the pixel as the hue is away from the center. The color conversion means may change at least one of saturation and brightness of a pixel having a hue within the second conversion target range which is away from the center of the second conversion target range while gradually decreasing a rate of changing at least one of the saturation and the brightness of the pixel as the hue is away from the center. When the first conversion target range and the second conversion target range partially overlap with each other, the color conversion means changes a rate of changing at least one of saturation and brightness of a pixel having a hue within an overlapping range in a curved manner such that a center of the overlapping range becomes minimum.
In an eighth aspect based on the first aspect, the color conversion apparatus may further comprise imaging means (23, 25). The imaging means is means for taking an image of a vicinity of the color conversion apparatus. In this case, the display image display control means may display an image taken by the imaging means as the display image on the display device in real time.
In a ninth aspect based on the first aspect, the display image display control means may display a chromatic image as the display image on the display device. In this case, as a first example, the color conversion means converts the display image into an achromatic image by decreasing saturation of a pixel of the display image which has a hue within the conversion target range, and displays the achromatic image on the display device.
In a tenth aspect based on the first aspect, the display image display control means may display on the display device the display image whose pixels are converted into black pixels by decreasing brightness of all pixels of a chromatic original image. In this case, the color conversion means returns brightness of a pixel of the display image which has a hue within the conversion target range to brightness in the original image, and displays a resultant image on the display device.
In an eleventh aspect based on the first aspect, the display image display control means may display a chromatic image as the display image on the display device. In this case, as a second example, the color conversion means decreases brightness of a pixel of the display image which has a hue within the conversion target range, and displays a resultant image on the display device.
In a twelfth aspect based on the first aspect, the display image display control means may display a chromatic image as the display image on the display device. In this case, as a third example, the color conversion means changes a hue of a pixel of the display image which has the hue within the conversion target range to another hue, and displays a resultant image on the display device.
In a thirteenth aspect based on the first aspect, the color conversion means further may change a color attribute with respect to a pixel of the display image which has a hue outside the conversion target range in a manner which is different from a manner of changing a color attribute with respect to a pixel having a hue within the conversion target range, and displays a resultant image on the display device.
A fourteenth aspect is an imaging apparatus for converting a color of a taken image displayed on a display device in accordance with an output from a pointing device for outputting an input position. The imaging apparatus comprises imaging means, taken image display control means, input position obtaining means, hue obtaining means, conversion target range setting means, and color conversion means. The imaging means is means for taking an image of a vicinity of the imaging apparatus. The taken image display control means is means for displaying a taken image taken by the imaging means on the display device in real time. The input position obtaining means is means for obtaining the input position from the pointing device. The hue obtaining means is means for obtaining a hue of the taken image corresponding to the input position obtained by the input position obtaining means. The conversion target range setting means is means for setting a predetermined hue range having the hue obtained by the hue obtaining means at a center thereof as a conversion target range. The color conversion means is means for changing at least one of saturation, brightness, hue with respect to a pixel of the taken image which has a hue within the conversion target range, and displaying a resultant image on the display device.
A fifteenth aspect is a computer-readable storage medium storing an imaging program executed by a computer (31) for converting a color of a taken image displayed on a display device in accordance with an output from a pointing device for outputting an input position. The imaging program causes the computer to operate as: taken image display control means; input position obtaining means; hue obtaining means; conversion target range setting means; and color conversion means. The taken image display control means is means for displaying a taken image taken by imaging means for taking an image of a vicinity on the display device in real time. The input position obtaining means is means for obtaining the input position from the pointing device. The hue obtaining means is means for obtaining a hue of the taken image corresponding to the input position obtained by the input position obtaining means. The conversion target range setting means is means for setting a predetermined hue range having the hue obtained by the hue obtaining means at a center thereof as a conversion target range. The color conversion means is means for changing at least one of saturation, brightness, and hue with respect to a pixel of the taken image which has a hue within the conversion target range, and displaying a resultant image on the display device.
According to the first aspect, only by the user once performing an operation with respect to the display image displayed on the display device to designate an input position or coordinates using the pointing device, it is possible to perform color conversion of the display image which is desired by the user. Further, when color conversion is performed with a color conversion target limited to only a hue of a pixel overlapping with the input position, it is considered that a significantly limited region (in an extreme case, only a pixel overlapping with the input position) of the display image is color-converted, and color conversion desired by the user cannot be performed. On the other hand, it is rare that the user desires to color-convert only a hue designated by the input position, and generally, the user desires hues adjacent to the hue to some extent to be color conversion targets. According to the first aspect, not only a hue corresponding to the touch position but also hues in a predetermined range having the hue at a center thereof are set to a range of a color conversion target. Thus, by setting the hues in the predetermined range as color conversion targets, hues slightly different from the hue of the pixel overlapping with the touch position can be color conversion targets, thereby enabling color conversion desired by the user to be performed.
According to the second aspect, only by the user once performing an operation with respect to the achromatic image displayed on the display device to designate a position at which a color desired by the user is originally expressed, it is possible to perform color conversion such that the color is restored in the achromatic image.
According to the third and fourth aspects, by setting the saturation so as to be gradually decreased with the hue which is set corresponding to the input position as a center, noise can be reduced in performing color conversion, and it is possible to convert into an image such that color which is originally expressed at the input position is naturally added.
According to the fifth aspect, when the user designates a plurality of input positions, it is possible to perform color conversion with respect to a hue corresponding to each of the input positions.
According to the sixth and seventh aspects, when color conversion with respect to a hue corresponding to each of the input positions is performed by the user designating a plurality of input positions, rates of changing attribute parameters with respect to hues within a range where the color conversions overlap with each other are smoothly connected, and it is possible to convert into an image such that a plurality of color conversion are naturally performed.
According to the eighth aspect, it is possible to perform color conversion processing with respect to the taken real-time image.
According to the ninth aspect, only by the user once performing an operation with respect to the chromatic image displayed on the display device to designate a position at which a color desired by the user is displayed, it is possible to perform color conversion such that the color designated in the chromatic image becomes an achromatic color.
According to the tenth aspect, only by the user once performing an operation with respect to the image which is filled with black and displayed on the display device to designate a position desired by the user, it is possible to perform color conversion such that only a color at the position designated by the user appears on the black image.
According to the eleventh aspect, only by the user once performing an operation with respect to the chromatic image displayed on the display device to designate a position at which a color desired by the user is displayed, it is possible to perform color conversion such that the color designated in the chromatic image is converted into a dark color.
According to the twelfth aspect, only by the user once performing an operation with respect to the chromatic image displayed on the display device to designate a position at which a color desired by the user is displayed, it is possible to perform color conversion such that the color designated in the chromatic image is converted into a different color.
According to the thirteenth aspect, only by performing different color conversion (e.g. color conversion in which a color attribute to be changed is different, or color conversion in which a color attribute to be changed is the same but a direction of change is different) with respect to a pixel having a hue outside the conversion target range, it is possible to perform various color conversion with respect to the display image.
Further, according to the imaging apparatus and the storage medium storing the imaging program, the same advantageous effects as those of the above color conversion apparatus can be obtained.
These and other objects, features, aspects and advantages of certain example embodiments will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.